package com.ketangpai.admin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.ketangpai.admin.utils.CustomDateDeserializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.lang.Nullable;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;

@Data
public class StuWork {
    private Integer id;
    private Integer workId;
    private Integer userId;
    private String username;
    private String score;
    private Integer status;
    private String message;
    private Integer groupId;
    private String content;
    private Integer checkCount;
    private Integer expediteCount;

    @JsonDeserialize(using = CustomDateDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkTime = null;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date submitTime;

    private Integer submitCount;
    private String filename;

    private String studentNo;   // 学号 (对应 user.no)
    private String studentName; // 姓名 (对应 user.name)
    // 添加新字段
    private String workContent; // 存储作业要求内容
    /**
     * 文件
     */
    @TableField(exist = false)
    @ApiModelProperty(dataType = "MultipartFile", name = "文件", value = "file")
    private MultipartFile file;

}
